<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page isELIgnored="false"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	
	    <meta name="description" content="">
	    <meta name="author" content="">
	    <title>已认证会员列表</title>
	
	    <!-- Bootstrap core CSS -->
	    <link href="${pageContext.request.contextPath}/resources/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	
	    <!-- Custom fonts for this template -->
	    <link href="${pageContext.request.contextPath}/resources/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	
	    <!-- Plugin CSS -->
	    <link href="${pageContext.request.contextPath}/resources/vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet">
	
	    <!-- Custom styles for this template -->
	    <link href="${pageContext.request.contextPath}/resources/css/sb-admin.css" rel="stylesheet">
		<link href="${pageContext.request.contextPath}/resources/css/login.css" rel="stylesheet"/>
        <!--<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-1.8.2.js"></script>-->
    	<!-- Bootstrap core JavaScript -->
	    <script src="${pageContext.request.contextPath}/resources/vendor/jquery/jquery.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/tether/tether.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/bootstrap/js/bootstrap.min.js"></script>
	
	    <!-- Plugin JavaScript -->
	    <script src="${pageContext.request.contextPath}/resources/vendor/jquery-easing/jquery.easing.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/chart.js/Chart.min.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/datatables/jquery.dataTables.js"></script>
	    <script src="${pageContext.request.contextPath}/resources/vendor/datatables/dataTables.bootstrap4.js"></script>
	
	    <!-- Custom scripts for this template -->
	    <script src="${pageContext.request.contextPath}/resources/js/sb-admin.min.js"></script>
    </head>
    <body id="page-top">

    <!-- Navigation -->
    <nav id="mainNav" class="navbar static-top navbar-toggleable-md navbar-inverse bg-inverse">
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarExample" aria-controls="navbarExample" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <a class="navbar-brand" href="#">管理系统</a>
        <div class="collapse navbar-collapse" id="navbarExample">
            <ul class="sidebar-nav navbar-nav">
               <li class="nav-item ">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/customer/ordinary"><i class="fa fa-fw fa-dashboard "></i> 普通用户列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/customer/wait"><i class="fa fa-fw fa-table"></i> 待认证会员列表</a>
                </li>
                <li class="nav-item active">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/customer/authenticated"><i class="fa fa-fw fa-table"></i> 已认证会员列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/borrow"><i class="fa fa-fw fa-wrench"></i> 申请借款列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/borrow_ed"><i class="fa fa-fw fa-wrench"></i> 已借款列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/repayment"><i class="fa fa-fw fa-sitemap"></i> 申请还款列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/order/repayment_ed"><i class="fa fa-fw fa-sitemap"></i> 已还款列表</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/sys/cost"><i class="fa fa-fw fa-dashboard "></i>借款方案管理</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/sys/manger"><i class="fa fa-fw fa-dashboard "></i>平台客服用户管理</a>
                </li>
            </ul>
            <ul class="navbar-nav ml-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle mr-lg-2" href="#" id="messagesDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-fw fa-envelope"></i> <span class="hidden-lg-up">Messages <span class="badge badge-pill badge-primary">12 New</span></span>
                        <span class="new-indicator text-primary hidden-md-down"><i class="fa fa-fw fa-circle"></i><span class="number">12</span></span>
                    </a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle mr-lg-2" href="#" id="alertsDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-fw fa-bell"></i> <span class="hidden-lg-up">Alerts <span class="badge badge-pill badge-warning">6 New</span></span>
                        <span class="new-indicator text-warning hidden-md-down"><i class="fa fa-fw fa-circle"></i><span class="number">6</span></span>
                    </a>
                </li>
                <li class="nav-item">
                    <form class="form-inline my-2 my-lg-0 mr-lg-2">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="搜索...">
                            <span class="input-group-btn">
                        <button class="btn btn-primary" type="button"><i class="fa fa-search"></i></button>
                    </span>
                        </div>
                    </form>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/admin/sys/quit"><i class="fa fa-fw fa-sign-out"></i> 退出登录</a>
                </li>
            </ul>
        </div>
    </nav>

    <div class="content-wrapper py-3">

        <div class="container-fluid">

            <!-- Breadcrumbs -->
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="#">已认证会员列表</a></li>
            </ol>

            
            
            <!-- Example Tables Card -->
            <div class="card mb-3">
                <div class="card-header dataTables_wrapper dt-bootstrap4">
                    <form  method="post" action="${pageContext.request.contextPath}/admin/customer/authenticated_query">
	                    <div class="row">
	                    	<div class="col-sm-12 col-md-4 letop">
	                    		<div class="dataTables_filter">
	                    		<label>手机号：<input type="search" class="form-control form-control-sm"/></label>
	                    		</div>
	                    	</div>
	                    	<div class="col-sm-12 col-md-4 letop">
	                    		<div class="dataTables_length">
		                    	<label>会员状态：<select class="form-control form-control-sm" style="width: 100px;">
		                    		<option>普通</option>
		                    		<option>会员</option>
		                    		<option>黑名单</option>
		                    	</select></label>
	                    		</div>
	                    	</div>
	                    	<div class="col-sm-12 col-md-4 letop">
	                    		<div class="dataTables_filter text-center" >
		                    	<label><input type="submit" value="检索" class="btn btn-primary btn-sm" /></label>
		                    	<label><input type="button" value="导出Excel" id="excel" class="btn btn-primary btn-sm" onclick="fun('excel')" /></label>
		                    	</div>
	                    	</div>
	                    </div>
                    </form>
                </div>
                <div class="card-block">
                    <div class="table-responsive">
                        <table class="table table-bordered" width="100%" id="dataTable" cellspacing="0">
                            <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>手机号</th>
                                    <th>会员姓名</th>
                                    <th>性别</th>
                                    <th>身份证号</th>
                                    <th>邮箱</th>
                                    <th>现居住地住址</th>
                                    <th>支付宝</th>
                                    <th>微信</th>
                                    <th>银联账号</th>
                                    <th>会员状态</th>
                                    <th>是否有借款</th>
                                    <th>功能</th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <th>编号</th>
                                    <th>手机号</th>
                                    <th>会员姓名</th>
                                    <th>性别</th>
                                    <th>身份证号</th>
                                    <th>邮箱</th>
                                    <th>现居住地住址</th>
                                    <th>支付宝</th>
                                    <th>微信</th>
                                    <th>银联账号</th>
                                    <th>会员状态</th>
                                    <th>是否有借款</th>
                                    <th>功能</th>
                                </tr>
                            </tfoot>
                            <tbody>
                                <c:forEach var="Vo" items="${customerList}" >	
                            	<tr>
                                <td>${Vo.customer_id}</td>
                                <td>${Vo.customer_name}</td>
                                <td>${Vo.true_name}</td>
                                <td><c:if test="${Vo.customer_sex=='0'}">男</c:if>
                                	<c:if test="${Vo.customer_sex=='1'}">女</c:if>
								</td>
                                <td>${Vo.id_card}</td>
                                <td>${Vo.email}</td>
                                <td>${Vo.address}</td>
                                <td>${Vo.zfb_code}</td>
                                <td>${Vo.wx_code}</td>
                                <td>${Vo.yl_code}</td>
                                <td><c:if test="${Vo.customer_status=='0'}">普通</c:if>
                                	<c:if test="${Vo.customer_status=='1'}">会员</c:if>
									<c:if test="${Vo.customer_status=='2'}">黑名单</c:if></td>
                                <td>
                                	<c:if test="${Vo.rz_money_limit==Vo.rz_surplus_money}">否</c:if>
									<c:if test="${Vo.rz_money_limit!=Vo.rz_surplus_money}">是</c:if></td>
                                </td>
                                <td><a href="${pageContext.request.contextPath}/admin/customer/au_query_ord/${Vo.customer_id}">查看详情</a></td>
                            	</tr>
                              	</c:forEach>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="card-footer small text-muted">
                    Updated yesterday at 11:59 PM
                </div>
            </div>

        </div>
        <!-- /.container-fluid -->

    </div>
    <!-- /.content-wrapper -->

    <a class="scroll-to-top rounded" href="#page-top">
        <i class="fa fa-chevron-up"></i>
    </a>

    
	<script type="text/javascript">
     //异步上传图片
	    function fun(fileId){
	    	$.ajax({
	    		type : 'post' ,
	    		secureuri:false,//一般设置为false
	    		fileElementId:fileId,//input id
	    	  	url :  '${pageContext.request.contextPath}/util/authenticated',
	    	    dataType: 'text' ,
	    	    success:function(data){
	    	    	if(data=='1'){
	    	    		alert("导出成功！");
	    	    	}
	    	    }
	    	}); 
	    }
    </script>
</body>
</html>